-#!/bin/sh
+#!/bin/bash
# Copyright (c) 2005, XenSource Ltd.
-#!/bin/sh
+#!/bin/bash
dir=$(dirname "$0")
. "$dir/block-common.sh"
-#!/bin/sh
+#!/bin/bash
# Usage: block-enbd [bind server ctl_port |unbind node]
#
-#!/bin/sh
+#!/bin/bash
# Usage: block-nbd [bind server ctl_port |unbind node]
#
-#!/bin/sh
+#!/bin/bash
# Copyright (c) 2005 IBM Corporation
#
-#!/bin/sh
+#!/bin/bash
#============================================================================
# Default Xen network start/stop script.
# Xend calls a network script when it starts.
-#!/bin/sh
+#!/bin/bash
#============================================================================
# Default Xen network start/stop script when using NAT.
# Xend calls a network script when it starts.
-#!/bin/sh
+#!/bin/bash
#============================================================================
# Default Xen network start/stop script.
# Xend calls a network script when it starts.
-#!/bin/sh
+#!/bin/bash
#============================================================================
# /etc/xen/vif-bridge
#
fi
-function frob_iptable()
+frob_iptable()
{
if [ "$command" == "online" ]
then
# to those coming from the specified networks, though we allow DHCP requests
# as well.
#
-function handle_iptable()
+handle_iptable()
{
# Check for a working iptables installation. Checking for the iptables
# binary is not sufficient, because the user may not have the appropriate
# Print the IP address currently in use at the given interface, or nothing if
# the interface is not up.
#
-function ip_of()
+ip_of()
{
ip addr show "$1" | awk "/^.*inet.*$1\$/{print \$2}" | sed -n '1 s,/.*,,p'
}
# to these scripts, or eth0 by default. This function will call fatal if no
# such interface could be found.
#
-function dom0_ip()
+dom0_ip()
{
local nd=${netdev:-eth0}
local result=$(ip_of "$nd")
-#!/bin/sh
+#!/bin/bash
#============================================================================
# /etc/xen/vif-nat
#
-#!/bin/sh
+#!/bin/bash
#============================================================================
# /etc/xen/vif-route
#
-#!/bin/sh
+#!/bin/bash
dir=$(dirname "$0")
. "$dir/vtpm-hotplug-common.sh"
-#!/bin/sh
+#!/bin/bash
# This scripts must be called the following way:
# vtpm-delete <domain name>
-#! /bin/sh
+#! /bin/bash
PATH=/etc/xen/scripts:$PATH
-#! /bin/sh
+#! /bin/bash
dir=$(dirname "$0")
. "$dir/xen-hotplug-common.sh"